﻿using System;
using System.Drawing;
using System.Windows.Forms;

namespace ConusicUI
{
    /// <summary>
    /// Description of TestForm.
    /// </summary>
    public partial class TestForm : Form
    {
        public TestForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var s = new xxx(this.Owner);
            //s.Sf how(this, new Point(0,0));
            this.Focus();
            textBox1.Focus();
        }

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if(e.KeyCode == Keys.L)
                button1_Click(null,null);
        }
    }

    public class xxx : ContextMenu
    {
        public xxx(Control owner) : base()
        {
            var lb = new ListBox();
            lb.Location = new Point(100,100);
            lb.Size = new Size(100, 100);
            lb.Items.AddRange(new string[] { "Gate", "Goat", "Galley", "Grapes", "Gorilla" });//Here u can    //populate from some DataSource..
            lb.Show();
            lb.Parent = owner;
        }
    }
}